/*
 * @Author: zehao.chen
 * @Date: 2022-07-10 11:03:30
 * @LastEditors: zehao.chen
 * @LastEditTime: 2022-07-30 18:35:16
 * @FilePath: /meeting-admin/src/service.js
 * @Description:
 *
 */
import http from '@/utils/request'
//  获取终端信息列表
export const getClientList = (data, config) => {
	return http.get('/client/management/clientcontroller/page', {params: data}, config)
}

export const getClientSort = (data, config) => {
  return http.get('/client/management/clientcontroller/getClientSort', {params: data}, config)
}

export const updateClientSort = (data, config) => {
  return http.post('/client/management/clientcontroller/updateClientSort', data, config)
}

//  获取分组管理
export const getGroupList = (data, config) => {
  return http.get('/client/management/clientgroupcontroller/page', {params: data}, config)
}

/**
 * @description: 新建模板库
 * @return {*}
 */
 export const addTemplate = (data, config) => {
	return http.post('/pc/meeting/template/addTemplate', data, config)
}

//  重启终端
export const clientRestart = (data, config) => {
  return http.post('/client/management/clientcontroller/restart', data, config)
}

//  删除终端
export const clientDelete = (data, config) => {
  return http.post(`/client/management/clientcontroller/delete?id=${data.id}`, data, config)
}

//  删除终端
export const clientMutiDelete = (data, config) => {
  return http.post(`/client/management/clientcontroller/batchDelete`, data, config)
}

//  重启
export const clientClose = (data, config) => {
  return http.post(`/client/management/clientcontroller/shutDown?id=${data.id}`, data, config)
}

//  修改终端
export const clientEdit = (data, config) => {
  return http.post(`/client/management/clientcontroller/save`, data, config)
}

//  修改终端
export const getClientFileList = (data, config) => {
  return http.post(`/sendfile/media/send-record/client/page`, data, config)
}

//  删除终端文件
export const delTerFile = (data, config) => {
  return http.post(`/sendfile/media/send-record/client/delete`, data, config)
}

// 指令发送包含ip
export const instructSendWithIp = (tmp, config) => {
  return http.post('/client/instruct/send', tmp, config)
}

// 网络唤醒
export const wakeup = (tmp, config) => {
  return http.post('/sendfile/magic/wake', tmp, config)
}

// 二维码操作
export const qrcode = (data, config) => {
  return http.post('/client/management/clientcontroller/qrcode', data, config)
}
